{extend name="public/base" /}
{block name="container"}
<div class="panel panel-default">
    <div class="panel-heading">
      <h4 class="panel-title">添加权限</h4>
      <div style="display: block; float: right; margin-top: -15px;" title="点击刷新"><a href="javascript:window.location.reload();"><i class="fa fa-refresh"></i></a></div>
  </div>
  <div class="panel-body panel-body-nopadding">

    <form class="form-horizontal form-bordered" id="submitForm" action="" method="post" >
        <div class="form-group">
            <label class="col-sm-3 control-label"><span>*</span>权限名称：</label>
            <div class="col-sm-6">
                <input type="text" class="form-control" placeholder="权限名称" name="rule" value="{$data.rule ?? ''}"  required>
            </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">所属模块：</label>
          <div class="col-sm-2">
            <select class="form-control" name="model">
                    <option value="-1"> --请选模块-- </option>
                    {volist name="menu" id="vo"}
                          <option value="{$vo.menu_name}">{$vo.menu_name} </option>
                    {/volist}
            </select>
          </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label"><span>*</span>权限说明：</label>
            <div class="col-sm-6">
                <input type="text" class="form-control" placeholder="权限说明" name="ruleinfo" value="{$data.ruleinfo ?? ''}"  required>
            </div>
        </div>
    <div class="panel-footer">
       <div class="row">
          <div class="col-sm-6 col-sm-offset-3">
            <input type="hidden" name="id" value="{$data.id ?? ''}">
            <button type="submit" class="btn btn-primary">提交</button>
            <button type="button" class="btn btn-default" onclick="javascript:history.back(-1);">返回</button>
        </div>
    </div>
</div><!-- panel-footer -->

</form>

</div><!-- panel-body -->
{/block}
{block name="js"}

{/block}